<script lang="ts" setup>
import { ref } from "vue";
const coun = ref(0);
console.log(coun);
const addCounter=()=> {
  coun.value++;
}
const subCounter=()=> {
  coun.value--;
}

</script>

<template>
  <button @click="addCounter()">+</button>
  <span>{{ coun }}</span>
  <button @click="subCounter()">-</button>
</template>

<style scoped>

</style>
